
#ifndef TIM_H_
#define TIM_H_


#include "include.h"

#define TIM_ClockPreq          (u8)(72u)
#define INPWM_RCCClockCmd()    do{RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM2,ENABLE);}while(0)
#define INPWM_TIM              (TIM2)
#define INPWM_TIM_ClockPreq    (u8)(6u)
#define INPWM_TIM_PSC          (u8)(TIM_ClockPreq/INPWM_TIM_ClockPreq-1)
#define INPWM_TIM_ARR          (u16)(65535u)



#define TIMBase_RCCClockCmd()    do{RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM6,ENABLE);}while(0)
#define TIMBase                  (TIM6)
#define TIMBase_TIM_ClockPreq    (u8)(1u)
#define TIMBase_TIM_PSC          (u8)(TIM_ClockPreq/TIMBase_TIM_ClockPreq-1)
#define TIMBase_TIM_ARR          (u16)(1000u-1)



extern void Tim_Config(void);
extern volatile u32 u32TimBaseCnt;
#endif






